package cn.sofwin.day0108;

import java.util.Scanner;

public class Test02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int age = 0;
        double hSeg = 0, lSeg = 0;
        for (int i = 0; i < 10; i++) {
            System.out.print("第" + (i + 1) +"名顾客的年龄是：");
            age = sc.nextInt();
            age = (int) ((age > 30) ? hSeg++ : lSeg++);
        }
        System.out.println("高于30岁的比例是：" + (hSeg / 10 * 100) + "%");
        System.out.println("低于30岁的比例是：" + (lSeg / 10 * 100) + "%");
    }
}
